home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
301-325
/
disk_319
/
cnewssrc
/
cnews.orig.lzh
/
notebook
/
ctlmsg
< prev
next >
Wrap
Text File
|
1989-06-27
|
2KB
|
106 lines
.TL
Control Message Implementation in C News
.AU
Geoff Collyer
.AI
Department of Statistics
University of Toronto
.SH
Introduction
.PP
Netnews
.I "control messages"
are ordinary-looking netnews articles which contain the
special header
.B "Control:" .
Such articles are filed in the pseudo-newsgroup
.I control
and cause related actions by the local news system,
such as mailing a file to the poster of the control message.
.SH
Built-ins
.PP
.B ihave ,
.B sendme ,
and
.B cancel
are handled internally by
.I relaynews ,
because processes cannot share open
.I dbm (3)
databases,
there is no standard way to close them,
and
these control messages read or write the
.I history
files,
including the
.I dbm
files.
.I Ihave
and
.I sendme
are also permitted to have message-id arguments containing
.B <
and
.B > ,
both of which are rejected by
.I relaynews
in arguments to externally-implemented control messages,
since they are shell metacharacters
(\c
.B /
and
.B ..
are also bounced)
and could be indicative of an attempt to
do something nasty.
.SH
Normal Control Messages
.PP
Most control messages are implemented by
.I relaynews
by executing the command following
.B Control: ,
with a search path of
.I $NEWSCTL/bin:$NEWSBIN/ctl
and with standard input set to
the control message article.
The command inherits
.I relaynews 's
user and group ids,
typically
.I news ;
this can be important
to gain access rights to control files.
The news system will be locked
(by
.I $NEWSCTL /lock)
while the command runs,
because
this is often important
for manipulating control files
from the command,
and
because
the news system is locked
while
.I relaynews
runs.
If that command returns non-zero exit status,
mail is sent to
.I $NEWSMASTER
(usually
.B usenet ).
Standard output and standard error
often are redirected to
.I $NEWSCTL /log
and
.I $NEWSCTL /errlog
respectively;
invocations of
.I relaynews
by
.I inews
are exceptions.